<template>
  <div class="f-btns">
    <el-button v-for="item of list" :key="item.code" v-bind="item.bind" @click="() => item.on(item)">{{ item.text }}</el-button>
  </div>
</template>

<script setup>
import { useBtns } from './src/hooks'

const props = defineProps({
  btns: { type: Array, default: () => [] }
})

const { list } = useBtns(props)
</script>

<style scoped>
.f-btns {
  box-sizing: border-box;
  padding: 14px;
  background-color: #ffffff;
}
</style>
